Visual Basic (Declaration) | |
---|---|
Public Overloads Sub ToByteArray( _ ByVal bytes() As Byte, _ ByVal offset As Integer _ ) |
Parameters
- bytes
- offset
Exception | Description |
---|---|
System.ArgumentNullException | The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument. |
System.ArgumentOutOfRangeException | The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method. |
Library/Library.Test/TestDbGuid.cs
C# | Copy Code |
---|---|
DbGuid testA = DbGuid.NewGuid(); byte[] bytes = new byte[1024]; testA.ToByteArray(bytes, 512); DbGuid testB = new DbGuid(bytes, 512); Assert.AreEqual(testA, testB); |
VB.NET | Copy Code |
---|---|
Dim testA As DbGuid = DbGuid.NewGuid() Dim bytes As Byte() = New Byte(1024) {} testA.ToByteArray(bytes, 512) Dim testB As New DbGuid(bytes, 512) Assert.AreEqual(testA, testB) |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
DbGuid StructureDbGuid Members
Overload List